



************
*Aggregate data analysis  for ``Learning to Love Government? Technological Change and the Political Economy of Higher Education''
******Journal of Politics

*************	



set scheme s2color, permanently



///Starting with home directory Learning to love JOP data/
//cd ../..
//cd "~/Learning to love JOP data/"

use "Data/Employmentratebygroup.dta", clear

cd "Output/1Aggregatedata"

log using "1Log.smcl", replace



 
**Figure B.1: Evolution since 1990 in employment and earnings by education level
**Figure B.1a: Employment rate (percent)
twoway (connected bachelors year, clcolor(navy) clpattern(solid) msymbol(circle) mcolor(navy) mlabsize(small) mlabcolor(black) mlabgap(1.5)) ///
       (connected somecollege year, clcolor(dkgreen) clpattern(shortdash) msymbol(square) mcolor(dkgreen) mlabsize(small) mlabcolor(black) mlabgap(1.5)) ///
       (connected highschool year, clcolor(maroon) clpattern(longdash) msymbol(triangle) mcolor(maroon) mlabsize(small) mlabcolor(black) mlabgap(1.5)) if year >= 1990, ///
       xtitle("") ytitle("") xscale(range(1990 2017)) xlabel(1990(3)2017) legend(rows(1) label(1 "Bachelor's") label(2 "Some College") label(3 "High School graduates") size(small)) ///
       graphregion(fcolor(white)) 
///yscale(range(0 90))///
 graph export "Employmentrate.png", replace


	
*Figure B.1b Earnings
cd ../..

use "Data/Earningsrate.dta", clear

cd "Output/1Aggregatedata"


	twoway (connected  mn_wg_0_4 year , clcolor(navy) clpattern(solid) msymbol(circle) mcolor(navy) mlabsize(small) mlabcolor(black) mlabgap(1.5))  ///
	 (connected  mn_wg_0_3 year, clcolor(dkgreen) clpattern(shortdash) msymbol(square) mcolor(dkgreen)  mlabsize(small) mlabcolor(black)  mlabgap(1.5))  ///
	 (connected   mn_wg_0_2 year, clcolor(maroon) clpattern(longdash) msymbol(triangle) mcolor(maroon)  mlabsize(small) mlabcolor(black)  mlabgap(1.5)) if year>=1990, ///
	xscale(range(1990 2012)) ///
	xlabel(1990(3)2012) ///
	legend(rows(1) label(1 "Bachelor's") label(2 "Some College") label(3 "High School") size(small)) ///
	graphregion(fcolor(white)) 


	graph export "Earningsrate.png", replace
	
	
	
	///Figure 1: Higher education investment by type of institution
cd ../..
	
use "Data/Higheredaggregateinstdata.dta"

cd "Output/1Aggregatedata"


twoway (connected aggrevenueall   year, clcolor(navy) clpattern(solid) msymbol(circle) mcolor(navy)  mlabsize(small) mlabcolor(black) mlabgap(1.5)) ///
	(connected aggrevenuenontier1 year, clcolor(maroon) clpattern(longdash) msymbol(triangle) mcolor(maroon)  mlabsize(small) mlabcolor(black)  mlabgap(1.5)) ///
	(connected aggrevenuenontier1public year, clcolor(dkgreen) clpattern(shortdash) msymbol(square) mcolor(dkgreen)  mlabsize(small) mlabcolor(black)  mlabgap(1.5)) if year>=1990, ///
	xtitle("") ///
	ytitle("") ///
	xscale(range(1990 2015)) ///
	xlabel(1990(3)2015) ///
	legend( label(1 "All institutions") label(2 "All non-tier 1 institutions") label(3 "All non-tier 1 public institutions") size(small)) ///
	ylabel(0 "$0" 5.00e+10 "$50 Bn" 1.00e+11 "$100 Bn" 1.50e+11 "$150 Bn" 2.00e+11 "$200 Bn" 2.50e+11 "$250 Bn", angle(horizontal)) ///
	graphregion(fcolor(white)) 
	
	
		 graph save "HigherEdinvestbyinstitutions.png", replace



 log close
	
	
	
	
	
	
